package com.neusoft.util;

public class MailStrUtil {
	
	public static String getMailStr(String mail) {
		String prefix = mail.split("@")[0];
		String suffix = mail.split("@")[1];
		
		//注意包头不包尾
		StringBuilder mailStr = new StringBuilder(prefix.substring(0, 1));
		for(int i = 0 ; i < prefix.length()- 1 ; i++){
			mailStr.append("*");
		}
		mailStr.append("@"+suffix);
		return mailStr.toString();
	}
	
	
	public static void main(String[] args) {
		System.out.println(getMailStr("liuyunxiang@daqi.com"));
	}

}
